package com.budwk.app.sys.models;

import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import com.budwk.starter.database.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.DB;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 数据字典
 * @author wizzer@qq.com
 */
@Data
@Accessors(chain = true)
@Table("shequ.sys_linux_package_lay")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@ApiModel(description = "linux部署表")
public class LinuxPackageLay implements Serializable {

    private static final long serialVersionUID = 1210793382290366000L;
    @Column
    @Name
    @Comment("ID")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(els = {@EL("snowflake()")}, nullEffective = true)
    private String id;

    @Column("file_name")
    @Comment("文件名称")
    @ApiModelProperty(description = "文件名称")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String fileName;

    @Column("old_file_name")
    @Comment("原文件")
    @ApiModelProperty(description = "原文件（发送失败需要重新发布该文件）")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String oldFileName;

    @Column("push_status")
    @Comment("状态（0 : 上传失败  1：未发布  2：已发布 5 发布失败）")
    @ApiModelProperty(description = "状态（0 : 上传失败  1：未发布  2：已发布 5 发布失败）")
    @ColDefine(type = ColType.INT, width = 2)
    private Integer pushStatus;

    @Column("path")
    @Comment("部署路径")
    @ApiModelProperty(description = "部署路径")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String path;

    @Column("create_id")
    @Comment("操作人id")
    @ApiModelProperty(description = "操作人id")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String createId;

    @Column("create_name")
    @Comment("操作人")
    @ApiModelProperty(description = "操作人")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String createName;

    @Column("create_time")
    @Comment("操作时间")
    @ApiModelProperty(description = "操作时间")
    @ColDefine(type = ColType.DATETIME)
    private LocalDateTime createTime;

    @Column("pusher_id")
    @Comment("发布人id")
    @ApiModelProperty(description = "pusher_id")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String pusherId;

    @Column("pusher_name")
    @Comment("发布人")
    @ApiModelProperty(description = "发布人")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String pusherName;

    @Column("config_id")
    @Comment("配置表id")
    @ApiModelProperty(description = "配置表id")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String configId;

    @Column("push_time")
    @Comment("发布时间")
    @ApiModelProperty(description = "发布时间")
    @ColDefine(type = ColType.DATETIME)
    private LocalDateTime pushTime;

}
